<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>博客详情</title>
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/semantic-ui/2.2.10/semantic.min.css" th:href="@{https://cdn.jsdelivr.net/semantic-ui/2.2.10/semantic.min.css}">
    <link rel="stylesheet" href="../static/css/typo.css" th:href="@{/css/typo.css}">
    <link rel="stylesheet" href="../static/css/animate.css" th:href="@{/css/animate.css}">
    <link rel="stylesheet" href="../static/lib/prism/prism.css" th:href="@{/lib/prism/prism.css}">
    <link rel="stylesheet" href="../static/lib/tocbot/tocbot.css" th:href="@{/lib/tocbot/tocbot.css}">
    <link rel="stylesheet" href="../static/css/me.css" th:href="@{/css/me.css}">
    <link rel="stylesheet" href="../static/lib/editormd/css/editormd.min.css" th:href="@{/lib/editormd/css/editormd.min.css}"/>
    <link rel="stylesheet" href="../static/lib/editormd/css/editormd.css" th:href="@{/lib/editormd/css/editormd.css}">
</head>

<body>
    <!-- 导航 -->
    <nav class="ui inverted attached segment m-padded-tb-mini m-shadow-small">
        <div class="ui container">
            <div class="ui inverted secondary stackable menu">
                <h2 class="ui teal header item">Blog</h2>
                <a href="/page/index" class="m-item item m-mobile-hide"><i class=" home icon"></i>首页</a>
                <a href="/page/type/initialize" class="m-item item m-mobile-hide"><i class=" idea icon"></i>分类</a>
                <a href="/page/label/initialize" class="m-item item m-mobile-hide"><i class=" tag icon"></i>标签</a>
                <a href="/page/about" class="m-item item m-mobile-hide"><i class=" info icon"></i>关于我</a>
                <div class="right m-item item m-mobile-hide">
                    <div class="ui input icon">
                        <input type="text" placeholder="搜索.....">
                        <i class="search link icon"></i>
                    </div>
                </div>
            </div>
        </div>
        <a href="#" class="ui menu toggle black icon button m-right-top m-mobile-show">
            <i class="sidebar icon"></i>
        </a>
    </nav>
    <!-- 中间内容 -->

    <div id="waypoint" class="m-container-small m-padded-tb-big animated fadeIn">
        <div class="ui container">
            <!-- 头部区 -->
            <div class="ui top attached segment">
                <div class="ui horizontal link list">
                    <div class="item">
                        <img src="https://unsplash.it/100/100?image=1005" th:src="@{https://unsplash.it/100/100?image=1005}" alt="" class="ui avatar image">
                        <div class="content"><a href="#" class="header">CFY</a></div>
                    </div>
                    <div class="item" th:text="${blog.getCreateTime()}">
<!--                        <i class="calendar icon"></i> 2017-10-01-->
                    </div>
<!--                    <div class="item">-->
<!--                        <i class="eye icon"></i> 2342-->
<!--                    </div>-->
                </div>
            </div>

<!--            图片区域-->
            <div class="ui attached segment">
                <img src="https://unsplash.it/800/450?image=1005" th:src="@{https://unsplash.it/800/450?image=1005}" alt="" class="ui fluid rounded image">
            </div>

            <div class="ui  attached padded segment">
                <div class="ui right aligned basic segment">
                    <div class="ui orange basic label" th:text="${blog.getFormat()}">原创</div>
                </div>
                <h2 class="ui center aligned header" th:text="${blog.getTitle()}">关于刻意练习的清单</h2>
                <div id="test-editormd" style="width: 90%;padding-left: 5%" >
                    <textarea style="display: none" name="test-editormd-markdown-doc" th:text="${blog.getContent()}">
                    </textarea>
                </div>

                <!--赞赏-->
                <div class="ui center aligned basic segment">
                    <button id="payButton" class="ui orange basic circular button">赞赏</button>
                </div>
                <div class="ui payQR flowing popup transition hidden">
                    <div class="ui orange basic label">
                        <div class="ui images" style="font-size: inherit !important;">
                            <div class="image">
                                <img src="../static/images/weixin.jpg" th:src="@{/images/weixin.jpg}" alt="" class="ui rounded bordered image" style="width: 120px">
                                <div>支付宝</div>
                            </div>
                            <div class="image">
                                <img src="../static/images/weixin.jpg" th:src="@{/images/weixin.jpg}" alt="" class="ui rounded bordered image" style="width: 120px">
                                <div>微信</div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>

            <!--博客信息-->
            <div class="ui attached positive message">
                <div class="ui middle aligned grid">
                    <div class="eleven wide column">
                        <ui class="list">
                            <li>作者：CFY（联系作者）</li>
                            <li th:text="'发表时间：'+${blog.getCreateTime()}">发表时间：2020-10-02 09:08</li>
                            <li>版权声明：自由转载-非商用-非衍生-保持署名</li>
<!--                            <li>公众号转载：请在文末添加作者公众号二维码</li>-->
                        </ui>
                    </div>
                    <div class="five wide column">
                        <img src="../static/images/weixin.jpg" th:src="@{/images/weixin.jpg}" alt="" class="ui right floated rounded bordered image"
                            style="width: 110px">
                    </div>
                </div>
            </div>

            <div id="comment-container" class="ui bottom attached segment">
                <!--留言区域列表-->
                <div class="ui teal segment">
                    <div class="ui threaded comments">
                        <h3 class="ui dividing header">Comments</h3>
                        <div class="comment">
                            <a class="avatar">
                                <img src="https://unsplash.it/100/100?image=1005">
                            </a>
                            <div class="content">
                                <a class="author">Matt</a>
                                <div class="metadata">
                                    <span class="date">Today at 5:42PM</span>
                                </div>
                                <div class="text">
                                    How artistic!
                                </div>
                                <div class="actions">
                                    <a class="reply">回复</a>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="ui form">
                    <div class="field">
                        <textarea name="content" placeholder="请输入评论信息..."></textarea>
                    </div>
                    <div class="fields">
                        <div class="field m-mobile-wide m-margin-bottom-small">
                            <div class="ui left icon input">
                                <i class="user icon"></i>
                                <input type="text" name="nickname" placeholder="姓名">
                            </div>
                        </div>
                        <div class="field m-mobile-wide m-margin-bottom-small">
                            <div class="ui left icon input">
                                <i class="mail icon"></i>
                                <input type="text" name="email" placeholder="邮箱">
                            </div>
                        </div>
                        <div class="field  m-margin-bottom-small m-mobile-wide">
                            <button class="ui teal button m-mobile-wide"><i class="edit icon"></i>发布</button>
                        </div>
                    </div>

                </div>
            </div>
        </div>
    </div>
    <div id="toolbar" class="m-padded m-fixed m-right-bottom" style="display: none">
      <div class="ui vertical icon buttons ">
        <button type="button" class="ui toc teal button" >目录</button>
        <a href="#comment-container" class="ui teal button" >留言</a>
        <button class="ui wechat icon button" ><i class="weixin icon"></i></button>
        <div id="toTop-button" class="ui icon button" ><i class="chevron up icon"></i></div>
      </div>
    </div>
  
    <div class="ui toc-container flowing popup transition hidden" style="width: 250px!important;">
      <ol class="js-toc">
  
      </ol>
    </div>
    <div id="qrcode" class="ui wechat-qr flowing popup transition hidden "style="width: 130px !important;">
    </div>
    <!-- 底部 -->
    <footer class="ui inverted vertical segment m-padded-tb-massive m-opacity">
        <div class="ui center aligned container">
            <div class="ui inverted divided stackable grid">
                <div class="four wide column">
                    <div class="ui inverted link list">
                        <div class="item">
                            <img src="../static/images/weixin.jpg" th:src="@{/images/weixin.jpg}" class="ui rounded image" alt="" style="width: 110px;">
                        </div>
                    </div>
                </div>
                <div class="four wide column">
                    <h4 class="ui inverted header m-text-thin m-text-spaced .m-text-lined">最新博客</h4>
                    <div class="ui inverted link list">
                        <a href="#" class="item">用户故事</a>
                        <a href="#" class="item">用户故事</a>
                        <a href="#" class="item">用户故事</a>
                    </div>
                </div>
                <div class="four wide column">
                    <h4 class="ui inverted header m-text-thin m-text-spaced .m-text-lined">联系我</h4>
                    <div class="ui inverted link list">
                        <a href="#" class="item">Email：cfy2522987453@163.com</a>
                        <a href="#" class="item">QQ:3507557207</a>
                    </div>
                </div>
                <div class="four wide column">
                    <h4 class="ui inverted header ">lirenme</h4>
                    <div class="ui inverted link list">
                        <p class="m-text-thin m-text-spaced .m-text-lined .m-opacity-mini">这是我的个人博客，欢迎大家访问，希望能给大家带来帮助
                        </p>
                    </div>
                </div>
            </div>
            <div class="ui inverted section divider"></div>
            <p class="m-text-thin m-text-spaced .m-text-lined .m-opacity-mini">暂无</p>
        </div>

    </footer>
    <script src="../static/js/jquery.min.js" th:src="@{/js/jquery.min.js}"></script>
    <script src="https://cdn.jsdelivr.net/semantic-ui/2.2.10/semantic.min.js" th:src="@{https://cdn.jsdelivr.net/semantic-ui/2.2.10/semantic.min.js}"></script>
    <script src="../static/lib/prism/prism.js" th:src="@{/lib/prism/prism.js}"></script>
    <script src="../static/lib/tocbot/tocbot.min.js" th:src="@{/lib/tocbot/tocbot.min.js}"></script>
    <script src="../static/lib/qrcode/qrcode.min.js" th:src="@{/lib/qrcode/qrcode.min.js}"></script>
    <script src="../static/lib/waypoints/jquery.waypoints.min.js" th:src="@{/lib/waypoints/jquery.waypoints.min.js}"></script>
    <script src="https://cdn.bootcdn.net/ajax/libs/jquery-scrollTo/2.1.2/jquery.scrollTo.min.js" th:src="@{https://cdn.bootcdn.net/ajax/libs/jquery-scrollTo/2.1.2/jquery.scrollTo.min.js}"></script>

    <script src="../static/lib/editormd/editormd.min.js" th:src="@{/lib/editormd/editormd.min.js}"></script>
    <script src="../static/lib/editormd/lib/marked.min.js" th:src="@{/lib/editormd/lib/marked.min.js}"></script>
    <script src="../static/lib/editormd/lib/prettify.min.js" th:src="@{/lib/editormd/lib/prettify.min.js}"></script>
    <script src="../static/lib/editormd/lib/raphael.min.js" th:src="@{/lib/editormd/lib/raphael.min.js}"></script>
    <script src="../static/lib/editormd/lib/underscore.min.js" th:src="@{/lib/editormd/lib/underscore.min.js}"></script>
    <script src="../static/lib/editormd/lib/sequence-diagram.min.js" th:src="@{/lib/editormd/lib/sequence-diagram.min.js}"></script>
    <script src="../static/lib/editormd/lib/flowchart.min.js" th:src="@{/lib/editormd/lib/flowchart.min.js}"></script>
    <script src="../static/lib/editormd/lib/jquery.flowchart.min.js" th:src="@{/lib/editormd/lib/jquery.flowchart.min.js}"></script>


    <script TYPE="text/javascript">

        var testEditor;
        $(function () {

            testEditor = editormd.markdownToHTML("test-editormd", {

                htmlDecode :"style, script, iframe",
                emoji           : true,
                taskList        : true,
                tex             : true,  // 默认不解析
                flowChart       : false,  // 默认不解析
                sequenceDiagram : true,  // 默认不解析
                path: "../../lib/editormd/lib/",
                // previewTheme: "dark"
                // imageFormats: ["jpg", "jpeg", "gif", "png", "bmp", "webp"],
                // saveHTMLToTextarea: true,
            });
        })

        $('.menu.toggle').click(function () {
            $('.m-item').toggleClass('m-mobile-hide');
        });
        $('#payButton').popup({
        popup : $('.payQR.popup'),
        on : 'click',
        position: 'bottom center'
        });
        tocbot.init({
      // Where to render the table of contents.
      tocSelector: '.js-toc',
      // Where to grab the headings to build the table of contents.
      contentSelector: '.js-toc-content',
      // Which headings to grab inside of the contentSelector element.
      headingSelector: 'h1, h2, h3',
    });

    $('.toc.button').popup({
      popup : $('.toc-container.popup'),
      on : 'click',
      position: 'left center'
    });

    $('.wechat').popup({
      popup : $('.wechat-qr'),
      position: 'left center'
    });

    var qrcode = new QRCode("qrcode", {
      //   博客地址
      text: "https://blog.csdn.net/weixin_62612279",
      width: 110,
      height: 110,
      colorDark : "#000000",
      colorLight : "#ffffff",
      correctLevel : QRCode.CorrectLevel.H
    });
    
    $('#toTop-button').click(function () {
      $(window).scrollTo(0,500);
    });


    var waypoint = new Waypoint({
      element: document.getElementById('waypoint'),
      handler: function(direction) {
        if (direction == 'down') {
          $('#toolbar').show(50);
        } else {
          $('#toolbar').hide(500);
        }
        console.log('Scrolled to waypoint!  ' + direction);
      }
    })
    </script>
</body>

</html>